using JoyfulHomeJourney.BackEnd.Infrastructure.EFCore;
using JoyfulHomeJourney.BackEnd.Infrastructure.Dtos.Responses.Objects;
using JoyfulHomeJourney.BackEnd.Infrastructure.Tools;
namespace JoyfulHomeJourney.BackEnd.Server.Instances.Extends.Responses
{
	public static class TrackingRecordsExtend
{
		public static ResponseTrackingRecordsDto ToResponseDto(this TrackingRecords entity)
{			return new ResponseTrackingRecordsDto
			{
				createAt = entity.CeCreateAt,
				createAtStr =Tools.TimeToString(entity.CeCreateAt),
				updateAt = entity.CeUpdateAt,
				updateAtStr =Tools.TimeToString(entity.CeUpdateAt),
				id = entity.TrId,
				location = entity.TrLocation,
				shippingId = entity.TrShippingId,
				statusDescription = entity.TrStatusDescription,
				updateTime = entity.TrUpdateTime,
				updateTimeStr =Tools.TimeToString(entity.TrUpdateTime),
			};
		}
	}
}
